<template>
    <div class=''>
     登录页面
     <input type="text" />
	<input type="password" />
	<button @click="submit">登录</button>
	<router-link to="/user/reg">注册</router-link>
 </div>
</template>

<script>
import { mapActions } from 'vuex'
export default {
    data() {
        return {};
    },
   created() {},
    methods: {
     ...mapActions({
			login: 'LOGIN_ACTION',
		}),
		submit() {
			this.login({
				username: '111111',
				password: '111111',
			}).then((res) => {
				if (res.code) {
					this.$router.back()
				} else {
					alert('登录失败')
				}
			})
		},

		
	
 },
    components:{}
};
</script>

<style lang='scss' scoped>

</style>
